home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / tchk20.arc / DEMO.ARC / DEMODISK.C < prev    next >
C/C++ Source or Header  |  1989-01-13  |  493b  |  18 lines

  1. /* demodisk.c  -  used for testing TCHK disktype() function */
  2.  
  3. #include <ibm.h>
  4. #include <dos.h>
  5.  
  6. main()
  7. {
  8.     byte id, drives;
  9.  
  10.     printf("DemoDisk.c  -  a demonstration of disktype() from TCHK\n\n");
  11.  
  12.     for (drives=1; drives<26; drives++)     /* drives A - Z */
  13.         if ((id = disktype(drives)) != DISK_INVALID)    /* valid drive? */
  14.             printf("Drive %c: has an id byte of %X\n",64+drives,id);
  15.  
  16.     printf("\nSee ibm.h for explanations of the id byte\n");
  17. }
  18.